/*!
 @header PacteraJPViewControllerHelper.h
 @abstract 视图控制器、window
 @author BruceHu
 @version 1.00 2020/08/31 Creation
 */

#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>

NS_ASSUME_NONNULL_BEGIN

/*!
 @class
 @abstract 视图控制器、window
 */
@interface PacteraJPViewControllerHelper : NSObject

#pragma mark --- FindCurrentShowingViewController
/*!
 @method
 @abstract 获取Window当前显示的视图控制器ViewController
 @discussion 获取Window当前显示的视图控制器ViewController
 @return 当前显示的视图控制器ViewController
 */
+ (UIViewController *)findCurrentShowingViewController;

/*!
 @method
 @abstract 获取Window当前显示的视图控制器ViewController
 @discussion 获取Window当前显示的视图控制器ViewController
 @param vc 从哪个界面开始分析
 @return 当前显示的视图控制器ViewController
 */
+ (UIViewController *)findCurrentShowingViewControllerFrom:(UIViewController *)vc;

#pragma mark --- FindBelongViewControllerForView
/*!
 @method
 @abstract 获取view属于哪一个Controller
 @discussion 获取view属于哪一个Controller
 @param view 需要找ViewController的view
 @return 返回显示view的对应ViewController
 */
+ (nullable UIViewController *)findBelongViewControllerForView:(UIView *)view;

#pragma mark --- findKeyWindow
/*!
 @method
 @abstract 获取keywindow
 @discussion 获取keywindow
 @return keywindow
 */
+ (nullable UIWindow *)findKeyWindow;

@end

NS_ASSUME_NONNULL_END
